#pragma once
#include "ISBNstruct.h"
#include <string>
#include "Chrono.h"
#include "Error.h"

using std::string;
using std::istream;
using std::ostream;
using my_err::Error;
using Chrono::Date;


namespace Books
{
	class Book
	{
	public:
		enum Genre{periodic, fantastic, prose, poetic, bio, kindbook, education};
		Book(ISBN isbn, string auth, string nm, Date dd, Genre genre,  bool issd = false);
		
		ISBN get_ISBN()				const {return book_ISBN;}
		string get_name()			const {return book_name;}	
		string get_author()			const {return book_author;}
		Genre get_genre()			const {return book_genre;}
		Date get_copyright_date()	const {return cr_registry_date;}
		bool is_issued()			const {return book_issued;}
		void set_state(bool state); 
	private:
		ISBN   book_ISBN;
		string book_name;
		string book_author;
		Date cr_registry_date;
		bool book_issued;
		Genre book_genre;
	};

bool operator == (const Book& b1, const Book b2);
bool operator != (const Book& b1, const Book b2);

ostream& operator << (ostream& outs, const Book& b);

}